#include "EntityTerrain.h"
#include "Visualisation.h"
#include "GfxEntityTerrain.h"
CEntityTerrain::CEntityTerrain(int gfxIndex):CWorldEntity()
{
	m_gfxIndex=gfxIndex;
	m_detectCollision=false;
}

CEntityTerrain::~CEntityTerrain(void){}

void CEntityTerrain::doUpdate(void){}

void CEntityTerrain::doRender(void)
{
	VIS->displayTerrain(m_gfxIndex);	
}

D3DXVECTOR3 CEntityTerrain::getMinBound()const
{
	return VIS->getMinBoundTerrain(m_gfxIndex);
}

D3DXVECTOR3 CEntityTerrain::getMaxBound()const
{
	return VIS->getMaxBoundTerrain(m_gfxIndex);
}

float CEntityTerrain::getCellWidth()const
{
	return VIS->getCellWidthTerrain(m_gfxIndex);
}
float CEntityTerrain::getCellHeight()const
{
	return VIS->getCellHeightTerrain(m_gfxIndex);
}

int CEntityTerrain::getNumCellWide()const
{
	return VIS->getNumCellWide(m_gfxIndex);
}
int CEntityTerrain::getNumCellHigh()const
{
	return VIS->getNumCellHigh(m_gfxIndex);
}

D3DXVECTOR3 CEntityTerrain::getVertex(int index)const
{
	return VIS->getVertexTerrain(m_gfxIndex, index);
}